<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .header{
            display: flex;
            justify-content: space-between;
            background-color: lightblue;
            border-radius: 1rem;
            padding: 1rem;
            /* width: fit-content; 不然就是父容器的的最大宽度 */
        }
        .news{
            background-color: lightcoral;
            border-radius: 1rem;
            padding: 1rem;
        }
        .actions{
            border-radius: 1rem;
            padding: 1rem;
            background-color: indigo;
            color: #fff;
        }
        .fit-container{ 
            margin-top: 2rem;
            background-color: lightseagreen;
            padding: 1rem;
            border-radius: 1rem;
            width: fit-content;
        }

        
    </style>
</head>
<body>
    <div class="header">
        <div class="news">文章分类</div>
        <div class="actions">Actions</div>
    </div>

    <div class="fit-container">
        <div>测试 fit content</div>
    </div>
</body>
</html>